const express = require('express');
const userController= require("../controllers/userController");
const uploadAvatar = require("../middleWares/uploadAvatar");
const route = express.Router();

route.post('/reg', uploadAvatar.single('avatar'), userController.reg)
route.post('/login', userController.login)
route.get('/checkUserExist', userController.checkUserExist)
route.get('/getJoinedGroup/:uid', userController.getJoinedGroups)
route.get('/getInbox', userController.getInbox)
route.get('/checkUserProfile', userController.checkProfile)
route.patch('/updateNickname', userController.updateNickname)
route.patch('/updateAvatar', uploadAvatar.single('avatar'), userController.updateAvatar)
route.get('/getUserSettings', userController.getUserSetting)
route.put('/updateUserTheme', userController.changeTheme)
route.put('/updatePrivacy', userController.updatePrivacy)
route.get('/getConversations', userController.getConversations)
route.get('/getFullProfile', userController.getFullProfile)

module.exports = route